interface Element {
  id: number,
  name: string,
  type: string,
  subtype: string,
  show: boolean,
  transform: {
    width: number,
    height: number,
    top: number,
    left: number,
    rotate: number
  },
  animation: any[],
  event: any,
  extra: any,
  data: any,
  custom: any,
  border: any
}

interface Project {
  id: number,
  name: string,
  img: string,
}

interface State {
  login: boolean,
  curElementId: number,
  menuVisible: boolean,
  groups: any,
  selectedElementIds: number[],
  elementList: Element[]
  projectList: Project[],
  selectedElementsTransform: any
}

const state: State = {
  login: false,
  curElementId: null,
  menuVisible: false,
  groups: [
    {
      id: 1,
      width: 200,
      height: 240,
      left: 110,
      top: 210,
      animation: [],
      event: {}
    }
  ],
  selectedElementIds: [],
  selectedElementsTransform: {
    width: 0,
    height: 0,
    left: 0,
    top: 0
  },
  projectList: [{
    id: 1,
    name: '123',
    img: '123'
  }, {
    id: 2,
    name: '1234',
    img: '123f'
  }, {
    id: 3,
    name: 'aaaaaaaa',
    img: '112'
  }, {
    id: 4,
    name: 'bbbbbb',
    img: '1222'
  }],
  elementList: [
    {
      id: 33,
      name: '组件三1',
      type: 'group',
      subtype: null,
      show: true,
      transform: {
        width: 200,
        height: 240,
        left: 110,
        top: 210,
        rotate: 0
      },
      event: {},
      animation: [],
      data: {},
      custom: [],
      extra: [3,331],
      border: {
        size: 0,
        style: 'solid',
        color: '#ddd',
        radius: 0,
        source: '',
        slice: 0,
        outset: 0,
        repeat: 'repeated'
      }
    },
    {
      id: 3,
      name: '组件三',
      'type': 'text',
      subtype: 'radio',
      show: true,
      transform: {
        width: 200,
        height: 40,
        top: 410,
        left: 110,
        rotate: 0
      },
      event: {},
      animation: [],
      data: {},
      custom: [],
      'extra': {
        'text': '这是一段文本',
        'color': '#333'
      },
      border: {
        size: 0,
        style: 'solid',
        color: '#ddd',
        radius: 0,
        source: '',
        slice: 0,
        outset: 0,
        repeat: 'repeated'
      }
    },{
      id: 331,
      name: '组件三',
      'type': 'text',
      subtype: 'radio',
      show: true,
      transform: {
        width: 200,
        height: 40,
        top: 210,
        left: 110,
        rotate: 0
      },
      event: {},
      animation: [],
      data: {},
      custom: [],
      'extra': {
        'text': '这是一段文本',
        'color': '#333'
      },
      border: {
        size: 0,
        style: 'solid',
        color: '#ddd',
        radius: 0,
        source: '',
        slice: 0,
        outset: 0,
        repeat: 'repeated'
      }
    }
  ]

};

export default state;
